Skip to main content

VWG Fluid Details file Import

Introduction

The VWG Fluid Details import loads VWG fluid code → description mappings into Cloud SQL so the VWG enquiry description flow can show friendly names for fluid lines.

Applicable Manufacturers

  • VWG (VWG group)

Cloud SQL table

  • Database: Cloud SQL for PostgreSQL
  • Table: vwg_fluid_details

Fields (Cloud SQL columns)

ColumnDescriptionDatatypeNotes
fluid_codeFluid codeVARCHAR(10)Primary key and indexed
unitUnitVARCHAR(20)Optional
descriptionFluid descriptionVARCHAR(255)Used as the fluid line name in enquiries
commentsCommentsTEXTOptional

File format

  • Expected input filename (default): ppso_conversion_codes.csv

CSV header fields used by the importer:

CSV headerCloud SQL columnMandatoryValidation
Codefluid_codeYesRequired;
row is skipped if missing
UnitunitNoOptional
DescriptiondescriptionYesRequired;
row is skipped if missing
CommentscommentsNoOptional

Row requirements:

  • Code and Description must be present, otherwise the row is skipped.

Importing a file

Preparation

  1. Upload ppso_conversion_codes.csv into bucketName/importFilesDropPath.

Validation

Trigger validation by calling the importer endpoint with persist="false":

  • POST /manufacturer/fluid-file-import

Payload example:

{
"bucketName": "fnp-imports-develop",
"importFilesDropPath": "vwg/",
"importFileName": "ppso_conversion_codes.csv",
"appDirectory":"importFiles/vwg/vehicle/",
"persist": "false",
"fnpProvider": "VWG",
"importType": "FLUIDS_PRICING"
}
KeyValue
bucketNameGoogle Bucket name
importFilesDropPathImport file drop location
appDirectoryApp Directory
persistfalse
fnpProviderFNP manufacturer provider
importFileNameImport file name
importTypeFluids Pricing Type

Importing

Trigger import by calling the endpoint:

  • POST /manufacturer/fluid-file-import Payload example:
{
"bucketName": "fnp-imports-develop",
"importFilesDropPath": "vwg/",
"importFileName": "ppso_conversion_codes.csv",
"appDirectory":"importFiles/vwg/vehicle/",
"persist": "true",
"fnpProvider": "VWG",
"importType": "FLUIDS_PRICING"
}
KeyValue
bucketNameGoogle Bucket name
importFilesDropPathImport file drop location
appDirectoryApp Directory
persisttrue
fnpProviderFNP manufacturer provider
importFileNameImport file name
importTypeFluids Pricing Type

Import behaviour (implementation)

  • In bucket mode, the file is downloaded locally to <appDirectory>/<importFileName> before parsing (for the example payload above: importFiles/vwg/vehicle/ppso_conversion_codes.csv).
  • In persist mode, rows are upserted into vwg_fluid_details using conflict key fluid_code.

Testing

  1. Confirm Cloud SQL table vwg_fluid_details has rows.
  2. Confirm fluid lines in VWG enquiry descriptions show friendly names (where codes are present in the table).